<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<<<<<<< HEAD
<<<<<<< HEAD
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
=======
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
>>>>>>> branch 'master' of https://gitee.com/cjt1997/gameTransactionPlatform.git
=======

    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
>>>>>>> branch 'master' of https://gitee.com/cjt1997/gameTransactionPlatform.git
    <%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/vue/vue.js"></script>
<script type="text/javascript" src="layui/layui.js"></script>
<script type="text/javascript" src="js/sweetalert/sweetalert2.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/sweetalert2.min.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="layui/css/layui.css" />
<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_521009_siu5ij1g14utbj4i.css" />
<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_521009_jg1hfi646xv18aor.css" />
<style type="text/css">
body{
	background-color:#101822;
}
td{
	text-align:center;
	font-size:22px;
	}
#header{
	background-color:#101822;
	width:80%;
	height:100px;
	margin:auto;
}
li{
	float:left;
	list-style:none;
	padding:0px;
	margin:0px;
}
a:hover,a:link{
	color:white;
	font-size:30px;
	text-decoration:none;
	display:block;
	padding:15px 70px;
}
img{
	margin:auto;
}
</style>
</head>

<body>
<div id="app">
<div id="header">
	<ul>
		<li><a href="#">首页</a></li>
		<li><a href="#">注册</a></li>
		<li><a href="#">登录</a></li>
		<li><a href="#">讨论区</a></li>
		<li><a href="#">积分商城</a></li>
		<li><a href="#">帮助信息</a></li>
	</ul>
	<div class="input-group col-md-4" style="margin-top:0px positon:relative;float:right;margin:auto;opacity:0.5">  
       <input type="text" class="form-control" placeholder="请输入查询字段" v-model="sea"/>  
            <span class="input-group-btn">  
               <button class="btn" style="height:34px" v-on:click="serach()"><i class="iconfont icon-sousuo-copy"></i></button>  
            </span>  
 	</div> 
</div>

<!-- ====================================================================================================================== -->
<div id="myCarousel" class="carousel slide">
	   
	<!-- 轮播（Carousel）项目 -->
	<div class="carousel-inner">
		<div class="item active">
			<img src="images/人马.jpg" alt="First slide">
		</div>
		<div class="item">
			<img src="images/锤石.jpg" alt="Second slide">
		</div>
		<div class="item">
			<img src="images/金克丝.jpg" alt="Third slide">
		</div>
		<div class="item">
			<img src="images/赵信.jpg" alt="Third slide">
		</div>
		<div class="item">
			<img src="images/剑姬.jpg" alt="Third slide">
		</div>
		<div class="item">
			<img src="images/琴女.jpg" alt="Third slide">
		</div>
		<div class="item">
<<<<<<< HEAD
			<img src="images/风女.jpg" alt="Third slide">
=======
			<img src="images/风女.jpg" alt="Third slide">
>>>>>>> branch 'master' of https://gitee.com/cjt1997/gameTransactionPlatform.git
		</div>
	</div>
	<!-- 轮播（Carousel）导航 -->
	<a class="carousel-control left" href="#myCarousel" 
	   data-slide="prev">&lsaquo;</a>
	<a class="carousel-control right" href="#myCarousel" 
	   data-slide="next">&rsaquo;</a>
</div> 

<div style="width:80%;margin:auto">
<table class="table">
	<tr>
		<td class="layui-bg-orange">商品价格</td>
		<td class="layui-bg-green">购买数量</td>
		<td class="layui-bg-cyan">商品图片</td>
		<td class="layui-bg-blue">购买时间</td>
		<td class="layui-bg-black">商品备注</td>
		<td class="layui-bg-red">操作</td>
	</tr>
		<tr v-for="li in list">
			<td class="layui-bg-orange">{{li.bprice}}</td>
			<td class="layui-bg-green">{{li.bsum}}</td>
			<td class="layui-bg-cyan"><img alt="图片暂时无法加载" style="height:100px" v-bind:src="li.bphoto"></td>
			<td class="layui-bg-blue">{{li.btime}}</td>
			<td class="layui-bg-black">{{li.gdetail}}</td>
			<td class="layui-bg-red"><a class="layui-btn layui-btn-danger" :href="'deleteBuyGoods?bid='+li.bid">删除</a></td>
		</tr>
</table>
<table class="table">
	<tr v-for="li2 in list2">
		<td>{{li2.gprice}}</td>
		<td>{{li2.gsum}}</td>
		<td><img alt="图片暂时无法加载" style="height:100px" v-bind:src="li2.gphoto"></td>
		<td>{{li2.gtime}}</td>
		<td>{{li2.gdetail}}</td>
	</tr>
</table>
</div>
</div>
</body>
<script type="text/javascript">
$(function(){
			$.ajax({
				url:'listBuyGoods',
				type:'post',
				async:true,
				dataType:'json',
				success:function(result){
					//console.log(result.bprice);
					vue.list=result;
				}
			});	
})
 var vue=new Vue({
	 el:'#app',
	 data:{
		 list:"",
		 list2:'',
	 },
	 methods:{
		 serach:function(){
			 //alert("nihao");
			 var sea_val=this.sea;
			 if(sea_val==null || sea_val==''){
				 alert("输入的内容为空!");
			 }else{
				 $.ajax({
					 url:'fuzzyQuery',
					 data:{"seaval":sea_val},
					 type:'post',
					 dataType:'json',
					 success:function(result){
						 vue.list2=result;
					 }
				 });
			 }
			 
		 }
	 }
 });
</script>
</html>